package cn.edu.sdjzu.xg.eagle.test;

import cn.edu.sdjzu.xg.eagle.util.Condition;
import cn.edu.sdjzu.xg.eagle.util.TxtHelper;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONArray;

import java.io.IOException;
import java.util.List;

public class JsonTest2 {
    public static void main(String args[])throws IOException{
        String json_array_str = TxtHelper.readTxt("files/"+"conditionArray.txt");

        List<Condition> conditionList = JSON.parseArray(json_array_str,Condition.class);
        System.out.println(conditionList);

        JSONArray json_array_obj = JSON.parseArray(json_array_str);
        System.out.println(json_array_obj);
    }
}
